package com.wulijie.iterator;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @Author cui
 * @Data
 */
public class InfoCollege implements College {
    private List<Department> departmentList;

    public InfoCollege() {
        departmentList = new ArrayList<>();
        addDepartment("信息安全", "信息安全");
        addDepartment("网络数据", "网络数据");
    }

    @Override
    public void addDepartment(String name, String desc) {
        this.departmentList.add(new Department(name, desc));
    }

    @Override
    public Iterator createIterator() {
        return new InfoIterator(this.departmentList);
    }

    @Override
    public String getName() {
        return "信息技术学院";
    }
}
